package com.lvmama.client.rhino;

import com.lvmama.common.result.Result;
import com.lvmama.pojo.base.Page;
import com.lvmama.pojo.dto.rhino.system.RoleDTO;
import com.lvmama.pojo.dto.rhino.system.RoleQueryDTO;
import com.lvmama.pojo.entity.rhino.system.Role;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @ClassName : RoleClient
 * @Description : 角色管理
 * @Author :Administrator
 * @Date : 2018/8/23 17:19
 * @Version V1.0
 **/
@FeignClient("rhino-web-service")
@RequestMapping("${server.servlet.context-path}")
public interface RoleClient {

    @RequestMapping(method = RequestMethod.POST,value = "/role/getRolePage",consumes = "application/json")
    Result<Page<Role>> getRolePage(@RequestBody RoleQueryDTO queryDTO);

    @RequestMapping(method = RequestMethod.POST,value = "/role/getRoleInfo",consumes = "application/json")
    Result<List<Role>> getRoleInfo(@RequestBody RoleQueryDTO queryDTO);

    @RequestMapping(method = RequestMethod.POST,value = "/role/saveRoleByRoleDTO",consumes = "application/json")
    Result<Integer> saveRoleByRoleDTO(@RequestBody RoleDTO roleDTO);

    @RequestMapping(method = RequestMethod.POST,value = "/role/updateRoleByRoleDTO",consumes = "application/json")
    Result<Integer> updateRoleByRoleDTO(@RequestBody RoleDTO roleDTO);

    @RequestMapping(method = RequestMethod.POST,value = "/role/getRoleById",consumes = "application/json")
    Result<Role> getRoleById(@RequestBody String id);

    @RequestMapping(method = RequestMethod.POST,value = "/role/getRoleMenusByRoleId",consumes = "application/json")
    Result<Role> getRoleMenusByRoleId(@RequestBody String id);

    @RequestMapping(method = RequestMethod.POST,value = "/role/deleteRoleById",consumes = "application/json")
    Result<Boolean> deleteRoleById(@RequestBody String id);
    @RequestMapping(method = RequestMethod.POST ,value = "/role/getRoleList",consumes = "application/json")
    Result<List<Role>> getRoleList(@RequestBody RoleQueryDTO roleQueryDTO);
}
